<div class="container">
<div  class="row">
	<div  class="col-md-9">
		<style>
	#param-tb {
	    border: 1px solid #C5D7ED;
	    border-collapse: collapse;
	    color: #333333;
	    margin: 0 -1px;
	}
	#param-tb th, #param-tb td {
	    border: 1px solid #C5D7ED;
	    line-height: 28px;
	    padding: 0 15px;
	}
	#param-tb .val{
		width:390px;
	}
	#param-tb .val span {
	    display: block;
	    line-height: 28px;
	}
	</style>


<h2 class="Content-title"><?php echo $Product['Product']['name']; ?></h2>
	    <div class="Content-info">
	   阅读次数： 
	   <span class="ui-stats-num" id="Stats-Product-{{$Product['Product']['id']}}-view_nums"><?php echo $Product['Product']['view_nums']; ?></span>
	    </div>
	    <div  id="productinfo">
	    	{{template Elements/images_zoom}}
	    	<div>
	            
	            <p> {{nl2br($Product['Product']['seodescription'])}}</p>
	            <p>价格： <span class="product-price">{{format_price($Product['Product']['price'])}}</span></p>

				{{if $Product['Product']['color']}}
					<p>颜色：
					<?PHP $colors = explode("\r\n",$Product['Product']['color']); ?>
					{{loop $colors $color}}
						<?php if(empty($color)) continue; ?>
						<label><input type="radio" name="color" value="{{$color}}">{{$color}}</label>
					{{/loop}}
					</p>
				{{/if}}
				{{if $Product['Product']['size']}}
				<p>尺码：
					<?PHP $sizes = explode("\r\n",$Product['Product']['size']); ?>
					{{loop $sizes $size}}
						<?php if(empty($size)) continue; ?>
						<label><input type="radio" name="size" value="{{$size}}">{{$size}}</label>
					{{/loop}}
				</p>
				{{/if}}
				{{if $Product['Product']['guige']}}
				<p>规格：
					<?PHP $guiges = explode("\r\n",$Product['Product']['guige']); ?>
					{{loop $guiges $guige}}
						<?php if(empty($guige)) continue; ?>
						<label><input type="radio" name="guige" value="{{$guige}}">{{$guige}}</label>
					{{/loop}}
				</p>
				{{/if}}
	            <div> 购买数量：
	            <div style="    display: inline-block; vertical-align: middle;">
	            <div class="input-group" style="width:135px;margin-bottom:10px;">
				  <span class="reduce input-group-addon" onclick="setAmount.reduce('#pamount')">-</span>
				  <input id="pamount" size="3" value="1" class="form-control" name="shoppingnum" type="text">
				  <span class="add input-group-addon" onclick="setAmount.add('#pamount')">+</span>
				</div>
				</div>
				</div>
				<p>
				<a aria-disabled="false" style="float:left;" class="btn btn-primary"
	 onclick="return addtoCart({{$Product['Product']['id']}},$('#shoppingnum').val());" href="javascript:void(0)">添加到购物车 </a>
	 			</p>
 			</div>
	    </div>
<div style="clear:both;"></div>
<div class="tabs">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#product-description">产品介绍</a></li>
{{if $Product['ModelSplitInfo']}}
<li><a data-toggle="tab" href="#product-params">产品参数</a></li>
{{/if}}
</ul>
<div  class="tab-content">
	<div class="tab-pane active" id="product-description">
		    <div class="Content-body">
	        <div class="clear"></div>
		    <?php echo $Product['Product']['content']; ?>
		    </div>
	</div>
	{{if $Product['ModelSplitInfo']}}
	<div class="tab-pane" id="product-params">
	<table  cellspacing="0" cellpadding="0" border="1" id="param-tb" style="border-color:#c5d7ed">
		{{loop $Product['ModelSplitInfo'] $key $value}}	
			<?PHP if(in_array($key,array('id','deleted'))) continue; ?>		
			<tr><td nowrap="nowrap">{{$ProductSplitSchema[$key]}}</td>
	            <td class="val"><span>{{if is_numeric($value)&& isset($ProductSplitOptions[$value])}} {{$ProductSplitOptions[$value]}} {{else}} {{$value}}{{/if}}</span></td>
	        </tr>
		{{/loop}}
	</table>
	</div>
	{{/if}}
</div>
</div>
	</div> <!-- end col-md-9 -->
	
	<div  class="col-md-3">
		<portlet model="Product" cached="900" showpages="0" title="最新产品" 		
info="fields[]=Product.id&fields[]=Product.name&fields[]=Product.created&order=id desc" 
		portlet="default" list_tpl="scripts" limit="8" order="id desc" ulclass="portlet-title-list">
		</portlet>
		
		<portlet
		model="Product" cached="900" showpages="0" title="热门产品"	
info="fields[]=Product.id&fields[]=Product.name&fields[]=Product.created&order=view_nums desc"
		portlet="default" list_tpl="scripts" limit="8" order="view_nums desc" ulclass="portlet-title-list">
		</portlet>
		
		
	</div>
</div>
</div>